<!DOCTYPE html>
<html lang="en">
<#--<link rel="stylesheet" href="/css/frame.css"/>-->
<link rel="stylesheet" href="/css/common/add.css"/>
<script type="text/javascript" src="${ctx}/plugin/jquery/jquery-2.1.1.js"></script>
<script type="text/javascript" src="${ctx}/plugin/jquery/jquery.form.js"></script>
<script type="text/javascript" src="${ctx}/plugin/jquery/jquery-validation/jquery.validate.min.js"></script>
<script type="text/javascript" src="${ctx}/plugin/layer-v1.9.2/layer/layer.js"></script>
<script type="text/javascript" src="${ctx}/common/common.js"></script>
<script type="text/javascript" src="${ctx}/js/task/changeOption.js"></script>

<script type="text/javascript">

    // initialise plugins
    /*jQuery(function(){
        jQuery('ul.sf-menu').superfish();
    });*/

</script>
<body style="height:100%;">
<div class="l_err" style="wid 100%; margin-top: 2px;"></div>
<form id="form" name="form" class="form-horizontal" method="post"
      action="/taskManage/addCheckChange"
      enctype="multipart/form-data">
<#--<input id="dataUrl" value="${dataUrl}" type="hidden"/>-->
    <section class="">
        <div class="form-layer-group clearfix">
            <input id="checkId" name="changeId" value="${checkId}" type="hidden"/>
            <input name="delPhotoId" type="hidden" id="delPhotoId" value=""/>
            <div class="form-group-div form-layer-input clearfix">
                <label class="control-label">整改意见：</label>
                <input name="closeMemo" type="text" id="closeMemo" value="${detailMap.closeMemo!""}"
                       class="span-medium"></input>
            <#--<input type="file" name="file" placeholder="请上传检查意见图片"  class="input-file-medium"id="file" value=""/>-->
            </div>
            <div class="form-group-div form-layer-input clearfix">
                <label class="control-label">整改图片：</label>
            <#--<input type="text" name="expressionDesc"  placeholder="请输入检查意见" class="input-medium"id="expressionDesc" value=""/>-->
            <#--<input type="file" name="file" placeholder="请上传检查意见图片"  class="input-file-medium"id="file" value=""/>-->
                <div style="float: left;margin-left: 50px">
                <#if detailMap.reformFileRecord??>
                    <input type="hidden" id="reformFileRecordSize" value="${detailMap.reformFileRecord?size}"/>
                    <#assign n = 0 />
                    <#list detailMap.reformFileRecord as fileRecord>
                        <#assign n = n+1 />
                        <#if n gt 3><#break></#if>
                        <div style="float: left;width: 100px">
                            <div style="float: left;width: 50px;height: 50px">
                                  <#if fileRecord.oldPhotoPath?? >
                                      <img style="float: left" src="${qnUrl}${fileRecord.oldPhotoPath!''}"
                                           onclick="enlargePhoto(this)"
                                           id="photo${fileRecord.id}" width="50px" height="50px"/>
                                  <#else >
                                      <img style="float: left" src="/images/whitepanel_bg2.png"
                                           onclick="enlargePhoto(this)"
                                           id="photo${fileRecord.id}" width="50px" height="50px"/>
                                  </#if>
                            </div>
                                <input  hidden class="add-inputfile"
                                        onchange="updateFile(this,'${fileRecord.id}',1)" id="photoFile${n}"
                                        type="file" name="imgFile${n}" accept="image/*"/>
                                <label style="float: left;margin-top: 5px;margin-left: 1px" for="photoFile${n}"
                                       title="点击上传文件">
                                    <span style="color:#3abdab;">替换</span>
                                </label>

                                <a style="float: left;color:#3abdab;margin-top: 5px;margin-left: 1px"
                                   href="javascript:deletePhoto('${fileRecord.id}',1,${n})">删除</a>
                        </div>
                    </#list>
                    <#if n lt 3>
                        <#list n..2 as t>
                            <#assign n = n+1 />
                            <#if n gt 3><#break></#if>
                            <div style="float: left;width: 100px">
                                <div style="float: left;width: 50px;height: 50px">
                                    <img style="float: left" src=""
                                         onclick="enlargePhoto(this)" hidden
                                         id="photo${n}" width="50px" height="50px"/>
                                </div>
                                    <input x hidden class="add-inputfile"
                                           onchange="updateFile(this,'${n}',2)" id="photoFile${n}"
                                           type="file" name="imgFile${n}" accept="image/*"/>
                                    <label style="float: left;margin-top: 5px;margin-left: 1px" for="photoFile${n}"
                                           title="点击上传文件">
                                        <span style="color:#3abdab;">添加</span>
                                    </label>

                                    <a style="float: left;color:#3abdab;margin-top: 5px;margin-left: 1px"
                                       href="javascript:deletePhoto('${n}',2,${n})">删除</a>
                            </div>
                        </#list>
                    </#if>
                <#else >
                    <input type="hidden" id="reformFileRecordSize" value="0"/>
                    <#list 0..2 as n>
                    <#--<#assign n = n+1 />-->
                    <#--<#if n gt 3><#break></#if>-->
                        <div style="float: left;width: 100px">
                            <div style="float: left;width: 50px;height: 50px">
                                <img style="float: left" src=""
                                     onclick="enlargePhoto(this)" hidden
                                     id="photo${n}" width="50px" height="50px"/>
                            </div>
                            <#if taskType == '1' >
                                <input hidden class="add-inputfile"
                                       onchange="updateFile(this,'${n}',2)" id="photoFile${n}"
                                       type="file" name="imgFile${n}" accept="image/*"/>
                                <label style="float: left;margin-top: 5px;margin-left: 1px" for="photoFile${n}"
                                       title="点击上传文件">
                                    <span style="color:#3abdab;">添加</span>
                                </label>

                                <a style="float: left;color:#3abdab;margin-top: 5px;margin-left: 1px"
                                   href="javascript:deletePhoto('${n}',2,${n})">删除</a>
                            </#if>
                        </div>
                    </#list>
                </#if>
                </div>
            </div>
            <div style="text-align: center;padding:12px 0px">
                <button type="button" class="cancel btn btn-cancel">取消</button>
                <button type="submit" id="submitButton" class="btn btn-main">确定</button>
            </div>
        </div>
    </section>
</form>
</body>

</html>
